home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 25 / AACD 25.iso / AACD / Graphics / PerfectPaint / rexx / Anim / Operators / Tunnel < prev    next >
Encoding:
Text File  |  2001-04-04  |  1.4 KB  |  92 lines

  1. /* Effect Operators Mosaic
  2. 100
  3. */
  4.  
  5.     call addlib("rexxmathlib.library", 5, -30, 0)
  6.  
  7.     options results
  8.  
  9.     parse ARG Port Opt1 Opt2 Opt3 s0 t0 s1 t1 b
  10.     
  11.     ADDRESS value Port
  12.  
  13.     pp_GetWidth
  14.     w=result
  15.     pp_GetHeight
  16.     h=result
  17.     pp_GetDepth
  18.     D=result
  19.  
  20.         pp_ComposeReqOff        
  21.         pp_GetCurrentBrush
  22.         CB=result
  23.         pp_FindEmptyBrush
  24.         Brush=result
  25.         pp_SetBrush Brush
  26.         pp_GotoFrame s0
  27.         pp_PicttoSpare
  28.         pp_GotoFrame s1            
  29.         pp_Pickbrush 0 0 W H
  30.  
  31.         Start_Fade=0
  32.         End_Fade=100
  33.         Start_Rot=180
  34.         End_Rot=0
  35.         Start_Scale=0
  36.         End_Scale=100
  37.  
  38.         Step=(s1-s0)
  39.         Step_Fade=(End_Fade-Start_Fade)/Step
  40.         Step_Rot=(End_Rot-Start_Rot)/Step
  41.         Step_Scale=(End_Scale-Start_Scale)/Step        
  42.         
  43.         Do i=s0 to s1
  44.  
  45.             rot=trunc(Start_Rot+Step_Rot*(i-s0)+0.5,0)
  46.             Fade=trunc(Start_Fade+Step_Fade*(i-s0)+0.5,0)
  47.             Scale=trunc(Start_Scale+Step_Scale*(i-s0)+0.5,0)
  48.  
  49.             IF t1=1 then DO
  50.                 pp_GotoFrame (s1+i-s0)                
  51.                 pp_Pickbrush 0 0 W H
  52.             END
  53.             ELSE DO
  54.                 pp_GotoFrame s1                
  55.                 pp_Pickbrush 0 0 W H
  56.             END
  57.  
  58.             pp_GotoFrame i
  59.             IF t0=0 then DO
  60.                 pp_GotoFrame i
  61.                 pp_SpareToPict
  62.             END
  63.  
  64.             IF i>s0 then DO
  65.                 if i<s1 then DO
  66.                 SX=trunc((w*Scale)/100+0.5,0)
  67.                 SY=trunc((h*Scale)/100+0.5,0)
  68.                 pp_ScaleBrush SX SY
  69.                 pp_BrushEffect 0 0 0 rot 2
  70.                 END
  71.             END
  72.  
  73.             IF Opt1=1 then DO
  74.                 pp_BrushOpacity Fade
  75.             END
  76.             
  77.             if i>s0 then DO
  78.                 pp_plot w/2 h/2
  79.             END
  80.         
  81.         END
  82.  
  83.         pp_Gotoframe s0
  84.         pp_FreeBrush
  85.         pp_SetBrush CB
  86.         pp_BrushOpacity 100
  87.  
  88.         pp_EffectOff
  89.         pp_ComposeReqOn    
  90.  
  91.     EXIT
  92.